<?php
/**
 * Created by a front-end programmer.
 * User: Xwen
 * Date: 2018/3/5
 * Time: 18:21
 * Mail:lauwencn@gmail.com
 */
class ArticleController extends CommonController{
    public function index(){
        $articleData = K('Article')->get_one((int)$_GET['aid']);
        $this->assign('articleData', $articleData);

        K('Article')->inc((int)$_GET['aid']);

        $aboutData = K('Article')->where('category_cid='.$articleData['category_cid'])->order('click desc')->limit(5)->all();
        $this->assign('aboutData', $aboutData);

        $this->display();
    }
}